﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using LeadThing.AbpZeroTemplate.WorkFlow_Runs.Dtos;
using LeadThing.AbpZeroTemplate.Dto;
using LeadThing.AbpZeroTemplate.WorkFlow_Run_Processs.Dtos;

namespace LeadThing.AbpZeroTemplate.WorkFlow_Runs
{
    /// <summary>
    /// 流程实例服务接口
    /// </summary>
    public interface IWorkFlow_RunAppService : IApplicationService
    {
        #region 扩展方法

        /// <summary>
        /// 根据DetailID获取所有的流程节点明细
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ListResultDto<WorkFlow_Run_ProcessListDto>> GetAllWorkFlow_Run_ProcessListByDetailID(GetWorkFlow_RunInput input);

        #endregion

        #region 流程实例管理

        /// <summary>
        /// 根据查询条件获取流程实例分页列表
        /// </summary>
        Task<PagedResultDto<WorkFlow_RunListDto>> GetPagedWorkFlow_RunsAsync(GetWorkFlow_RunInput input);

        /// <summary>
        /// 通过Id获取流程实例信息进行编辑或修改 
        /// </summary>
        Task<GetWorkFlow_RunForEditOutput> GetWorkFlow_RunForEditAsync(NullableIdDto<long> input);

        /// <summary>
        /// 通过指定id获取流程实例ListDto信息
        /// </summary>
        Task<WorkFlow_RunListDto> GetWorkFlow_RunByIdAsync(EntityDto<long> input);



        /// <summary>
        /// 新增或更改流程实例
        /// </summary>
        Task CreateOrUpdateWorkFlow_RunAsync(CreateOrUpdateWorkFlow_RunInput input);





        /// <summary>
        /// 新增流程实例
        /// </summary>
        Task<WorkFlow_RunEditDto> CreateWorkFlow_RunAsync(WorkFlow_RunEditDto input);

        /// <summary>
        /// 更新流程实例
        /// </summary>
        Task UpdateWorkFlow_RunAsync(WorkFlow_RunEditDto input);

        /// <summary>
        /// 删除流程实例
        /// </summary>
        Task DeleteWorkFlow_RunAsync(EntityDto<long> input);

        /// <summary>
        /// 批量删除流程实例
        /// </summary>
        Task BatchDeleteWorkFlow_RunAsync(List<long> input);

        #endregion

        #region Excel导出功能

        /// <summary>
        /// 获取流程实例信息转换为Excel
        /// </summary>
        /// <returns></returns>
        Task<FileDto> GetWorkFlow_RunToExcel();

        #endregion

    }
}
